/*
 * File: basic_practice.c
 *
 * Code generated for Simulink model 'basic_practice'.
 *
 * Model version                  : 1.3
 * Simulink Coder version         : 25.1 (R2025a) 21-Nov-2024
 * C/C++ source code generated on : Thu Jul 17 16:15:02 2025
 *
 * Target selection: ert.tlc
 * Embedded hardware selection: Intel->x86-64 (Windows64)
 * Code generation objectives: Unspecified
 * Validation result: Not run
 */

#include "basic_practice.h"
#include "basic_practice_private.h"

/* Real-time model */
static RT_MODEL_basic_practice_T basic_practice_M_;
RT_MODEL_basic_practice_T *const basic_practice_M = &basic_practice_M_;

/* Model step function */
void basic_practice_step(void)
{
  /* Update absolute time for base rate */
  /* The "clockTick0" counts the number of times the code of this task has
   * been executed. The absolute time is the multiplication of "clockTick0"
   * and "Timing.stepSize0". Size of "clockTick0" ensures timer will not
   * overflow during the application lifespan selected.
   */
  basic_practice_M->Timing.t[0] =
    ((time_T)(++basic_practice_M->Timing.clockTick0)) *
    basic_practice_M->Timing.stepSize0;

  {
    /* Update absolute timer for sample time: [0.01s, 0.0s] */
    /* The "clockTick1" counts the number of times the code of this task has
     * been executed. The resolution of this integer timer is 0.01, which is the step size
     * of the task. Size of "clockTick1" ensures timer will not overflow during the
     * application lifespan selected.
     */
    basic_practice_M->Timing.clockTick1++;
  }
}

/* Model initialize function */
void basic_practice_initialize(void)
{
  /* Registration code */
  {
    /* Setup solver object */
    rtsiSetSimTimeStepPtr(&basic_practice_M->solverInfo,
                          &basic_practice_M->Timing.simTimeStep);
    rtsiSetTPtr(&basic_practice_M->solverInfo, &rtmGetTPtr(basic_practice_M));
    rtsiSetStepSizePtr(&basic_practice_M->solverInfo,
                       &basic_practice_M->Timing.stepSize0);
    rtsiSetErrorStatusPtr(&basic_practice_M->solverInfo, (&rtmGetErrorStatus
      (basic_practice_M)));
    rtsiSetRTModelPtr(&basic_practice_M->solverInfo, basic_practice_M);
  }

  rtsiSetSimTimeStep(&basic_practice_M->solverInfo, MAJOR_TIME_STEP);
  rtsiSetIsMinorTimeStepWithModeChange(&basic_practice_M->solverInfo, false);
  rtsiSetIsContModeFrozen(&basic_practice_M->solverInfo, false);
  rtsiSetSolverName(&basic_practice_M->solverInfo,"FixedStepDiscrete");
  rtmSetTPtr(basic_practice_M, &basic_practice_M->Timing.tArray[0]);
  basic_practice_M->Timing.stepSize0 = 0.01;
}

/* Model terminate function */
void basic_practice_terminate(void)
{
  /* (no terminate code required) */
}

/*
 * File trailer for generated code.
 *
 * [EOF]
 */
